package com.cskaoyan.bean.po.goods;

import com.baomidou.mybatisplus.annotation.TableName;
import com.cskaoyan.bean.bo.goods.CreateAttributesBO;
import com.cskaoyan.bean.bo.goods.CreateGoodsBO;
import com.cskaoyan.bean.bo.goods.CreateProductsBO;
import com.cskaoyan.bean.bo.goods.CreateSpecificationsBO;
import com.cskaoyan.util.common.StringUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import net.sf.json.JSONArray;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author: 冯子靖
 * @Description:
 * @Date: 2022/7/19 12:50
 */
@Data
@TableName("market_goods")
public class AdminGoodsGoodsDetailPO {

    private Integer id;

    private String goodsSn;

    private String name;

    private Integer categoryId;

    private Integer brandId;

    private String[] gallery;

    private String keywords;

    private String brief;

    private Boolean isOnSale;

    private Short sortOrder;

    private String picUrl;

    private Boolean isNew;

    private Boolean isHot;

    private String unit;

    private BigDecimal counterPrice;

    private BigDecimal retailPrice;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date addTime;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    private Boolean deleted;

    private String detail;

    public void setGallery(String gallery) {
        this.gallery = StringUtils.splitJsonArrays(gallery);
    }



}
